package com.sansecy.customview.view.check;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import android.view.View;

import com.sansecy.customview.R;

public class CheckedActivity extends AppCompatActivity {
    public static void start(Context context) {
        Intent starter = new Intent(context, CheckedActivity.class);
        context.startActivity(starter);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_checked);
        final CheckedView checkedView = findViewById(R.id.CheckedView);
        checkedView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                checkedView.setChecked(!checkedView.isChecked());
            }
        });
    }
}
